package cn.mesmile.storage.controller;

import com.sun.xml.internal.ws.api.ha.StickyFeature;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zb
 * @date 2021/3/12 17:29
 * @Description
 */
@RequestMapping("/api/v1/storage")
@RestController
public class StorageController {


    @GetMapping("/get")
    public Object get(){
        Map<String, Object> stringObjectHashMap = new HashMap<>();
        stringObjectHashMap.put("test"," 这是一段测试文字");
        stringObjectHashMap.put("test2"," 这是一段测试文字");
        return stringObjectHashMap;
    }

    @PostMapping("/get")
    public Object upload(@RequestParam("file")MultipartFile file){
        Map<String, Object> stringObjectHashMap = new HashMap<>();
        stringObjectHashMap.put("test"," 这是一段测试文字");
        stringObjectHashMap.put("test2"," 这是一段测试文字");
        return stringObjectHashMap;
    }



}
